﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../MasterPage.Master"
    CodeBehind="wfProducto.aspx.cs" Inherits="CO.wfProducto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
        <base target="_self" />

<%--    <link href="../Styles/General.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/token-input-facebook.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui.custom.css" rel="stylesheet" type="text/css" />

    <script src="../Scripts/jquery.min.js" type="text/javascript"></script>
   
    <script src="../Scripts/jquery.tokeninput.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.purr.js" type="text/javascript"></script>
    <script src="../Scripts/General.js" type="text/javascript"></script>--%>

    <script  type="text/javascript">
        window.onload = function () {
            this.ResizeGrid();
            this.MessageOnPostback();
        }

        function ResizeGrid() {
            internalGridResize("<%= gvListar.ClientID %>");
        }

        function DevolverDatos(cod, pres, producto, presenta, um, peso_bruto) {
            opener.fDevolverSeleccion5(cod, pres, producto, presenta, um, peso_bruto);
        }

        function panelOnUpdating() {
            updatePanelAnimationUpdating();
        }

        function panelOnUpdated() {
            ResizeGrid();
            updatePanelAnimationUpdated();
        }
     </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="DataHeader">
                <table id="TableDataHeader" cellpadding="0" cellspacing="0">
                    <tr>
                        <td colspan="3">
                            <div class="modalPopupHeader">
                                <asp:Label ID="lblTitlePopup" runat="server"></asp:Label>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5px;">
                            &nbsp;
                        </td>
                        <td>
                            <table width="100%" cellpadding="0" cellspacing="2">
                                <tr>
                                    <td>
                                        <table width="100%" cellpadding="0" cellspacing="2">
                                            <tr>
                                                <td style="width: 5px;">
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    Codigo
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtCodigo" runat="server" CssClass="esdTextBox" Width="100px"></asp:TextBox>
                                                </td>
                                                <td style="width:10px;">
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    Descripción
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtDes" runat="server" CssClass="esdTextBox" Width="300px"></asp:TextBox>
                                                </td>
                                                <td style="width: 10px;">
                                                    <asp:Button ID="btnBuscar" runat="server" Text="Buscar" CssClass="esdButtonStyle" Width="80px" onclick="btnBuscar_Click1" />
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td style="width: 5px;">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr align="center">
                                    <caption>
                                        <td></td>
                                    </caption>
                                </tr>
                            </table>
                        </td>
                        <td style="width: 5px;">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5px;">
                            &nbsp;
                        </td>
                        <td align="right">
                            <asp:Button ID="bttOkPopup" runat="server" Text="Aceptar" Width="80px" ></asp:Button>
                            <asp:Button ID="bttCancelPopup" runat="server" Text="Cancelar" Width="80px" ></asp:Button>
                        </td>
                        <td style="width: 5px;">
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </div>
            <div class="DataDetail">
                <asp:GridView ID="gvListar" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="0" GridLines="None" ShowFooter="True" 
                    Width="750px" onrowdatabound="gvListar_RowDataBound" onpageindexchanging="gvListar_PageIndexChanging">
                    <AlternatingRowStyle CssClass="esdGridAlternativeRowStyle" />
                    <Columns>
                            <asp:TemplateField HeaderText="Codigo">
                            <ItemTemplate>
                                <asp:Label ID="lblMCLCodigo" runat="server" Text='<%# Bind("Codigo") %>' >
                                </asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Pres">
                            <ItemTemplate>
                                <asp:Label ID="lblPres" runat="server" Text='<%# Bind("Pres") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Producto">
                            <ItemTemplate>
                                <asp:Label ID="lblProducto" runat="server" Text='<%# Bind("Producto") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Presenta">
                            <ItemTemplate>
                                <asp:Label ID="lblPresenta" runat="server" Text='<%# Bind("Presenta") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="tgxdef">
                            <ItemTemplate>
                                <asp:Label ID="lblTgxdef" runat="server" Text='<%# Bind("tgxdef") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Tipgasto">
                            <ItemTemplate>
                                <asp:Label ID="lblTipGasto" runat="server" Text='<%# Bind("tipgasto") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="UM">
                            <ItemTemplate>
                                <asp:Label ID="lblUM" runat="server" Text='<%# Bind("UM") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Peso Bruto">
                            <ItemTemplate>
                                <asp:Label ID="lblPesoBruto" runat="server" Text='<%# Bind("[Peso Bruto]") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Reserva">
                            <ItemTemplate>
                                <asp:Label ID="lblReserva" runat="server" Text='<%# Bind("reserva") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField>
                            <ItemTemplate>
                                <a ID="lnkSeleccionar" runat="server" href="javascript:void(0)">Seleccionar</a>
                            </ItemTemplate>
                            <ItemStyle Width="50px" />
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="esdGridHeaderStyle" />
                    <PagerStyle CssClass="gridPagerStyle" />
                    <RowStyle CssClass="esdGridRowStyle" />
                    <SelectedRowStyle CssClass="esdGridSelectedRowStyle" />
                </asp:GridView>
            </div>                         
            <asp:HiddenField ID="hdnidCliProv" runat="server" />
        </ContentTemplate> 
    </asp:UpdatePanel>
<ajax:UpdatePanelAnimationExtender ID="upae" BehaviorID="animation" runat="server"
    TargetControlID="updatePanel1">
    <animations>
        <OnUpdating>
        <Parallel duration="0.5">
            <ScriptAction Script="panelOnUpdating();" />  
        </Parallel>
        </OnUpdating>
        <OnUpdated>
        <Parallel duration="0.5">
            <ScriptAction Script="panelOnUpdated();" /> 
        </Parallel> 
        </OnUpdated>
    </animations>
</ajax:UpdatePanelAnimationExtender>
<div id="updateProgressDiv" class="updateProgress" style="display: none">
        <table width="100%">
            <tr>
                <td valign="middle">
                    <img src="../Images/Controls/Loading.gif" />
                </td>
                <td valign="middle">
                    <span class="updateProgressMessage">Cargando ...</span>
                </td>
            </tr>
        </table>
</div>
</asp:Content>
